home *** CD-ROM | disk | FTP | other *** search
- #include "rectpie.hpp"
-
-
- void Rectangle::show(int xxpose, int yxpose,
- unsigned scale)
- {
- int poly[10];
- int dw = (int)(width/2*scale);
- int dh = (int)(heighth/2*scale);
- int l = (int)getx()+xxpose - dw;
- int t = (int)gety()+yxpose - dh;
- int r = (int)getx()+xxpose + dw;
- int b = (int)gety()+yxpose + dh;
-
- poly[0] = l; poly[1] = t;
- poly[2] = r; poly[3] = t;
- poly[4] = r; poly[5] = b;
- poly[6] = l; poly[7] = b;
- poly[8] = l; poly[9] = t;
-
- drawpoly(5,poly);
- }
-
-
- void PieSlice::show(int xxpose, int yxpose,
- unsigned scale)
- {
- pieslice((int)getx()+xxpose,
- (int)gety()+yxpose,
- (int)startAngle,(int)endAngle,
- (int)(radius*scale));
- // radius is in Circle protected scope so it
- // is accessible from PieSlice
- }
-